package pl.kosmowska.ewelina.client.views.widgets.dialogs;


import com.google.gwt.event.shared.GwtEvent;


public class OptionEvent extends GwtEvent<OptionEventHandler> {

  public static Type<OptionEventHandler> TYPE = new Type<OptionEventHandler>();

  public static enum Selected {
    OPTION_1, OPTION_2, OPTION_3, TRUE, FALSE;
  }

  private Selected selected;

  public OptionEvent(Selected selected) {
    this.selected = selected;
  }


@Override
  public Type<OptionEventHandler> getAssociatedType() {
    return TYPE;
  }

  @Override
  protected void dispatch(OptionEventHandler handler) {
    handler.onOptionEvent(this);
  }

  public Selected getOptionEvent() {
    return selected;
  }

}
